<?php
/**
 * 
 * @version 0.1
 * @author Sander van Belleghem
 * 
 */
if (!isset($active)) {
    header('Location: ../index.php?page=home');
}

$recht_bitfield = new RechtBitfield();
$recht_bitfield->setBitfield($data_array_bitfield);

?>

<div id="header">
    <div id="logo"></div>
    <div id="headertext">Dashboard</div>
</div>
<div id="content2">
    <div id="contentbg">
        <div id="contentblock1">
            <div id="contentblock1text">
                <div id="dashboard1"> 
                    <?php
                    if ($recht_bitfield->heeftRecht('30') == false) {                        
                        echo '<img src="images/inactiefsummary.png"><div id="dashboard1txt">Overzicht</div>';
                    } else {
                        echo '<a href="index.php?page=overzicht" id="dashboard1"><img src="images/summary.png" height="60" width="60" /><div id="dashboard1txt">Overzicht</div></a>';
                    }
                    ?>
                </div> 
                <div id="dashboard2">

                    <?php
                    
                    $rechten_array_vgp = array('9','10','11','12');
                    
                    if ($recht_bitfield->heeftMinimaal1Recht($rechten_array_vgp) == true){
                        echo '<a href="index.php?page=gezondheidsplan" id="dashboard2"><img src="images/check.png" height="60" width="60"  /><div id="dashboard2txt">Nieuw V & G Plan</div></a>';
                    } else {
                       echo '<a href="" id="dashboard2" onclick="return false"><img src="images/inactiefcheck.png"><div id="dashboard2txt">Nieuw V & G Plan</div></a>';
                    }
                    ?>
                </div>    

                <div id="dashboard3">

                    <?php
                    $rechten_array_wpi = array('1','2','3','4');
                    
                    if ($recht_bitfield->heeftMinimaal1Recht($rechten_array_wpi) == true){
                        echo '<a href="index.php?page=werkplekinspectie" id="dashboard3"><img src="images/document_1.png" height="60" width="60"/><div id="dashboard3txt">Nieuw Werkplekinspectie</div></a>';
                    } else {
                        echo '<a href="" id="dashboard3" onclick="return false"><img src="images/inactiefdocument_1.png" height="60" width="60"/><div id="dashboard3txt">Nieuw Werkplekinspectie</div></a>';
                    }
                    ?>
                </div>
                <div id="dashboard4">

                    <?php
                    $rechten_array_presentie = array('5','6','7','8');
                    
                    if ($recht_bitfield->heeftMinimaal1Recht($rechten_array_presentie) == true){
                        echo '<a href="index.php?page=presentielijst" id="dashboard4"><img src="images/document3.png" height="60" width="60" /><div id="dashboard4txt">Nieuw Toolboxmeeting</div></a>';
                    } else {
                        echo '<a href="" id="dashboard4" onclick="return false"><img src="images/inactiefdocument_3.png" height="60" width="60" /><div id="dashboard4txt">Nieuw Toolboxmeeting</div></a>';
                    }
                    ?>

                </div>
                <div id="dashboard3">

                    <?php
                    if ($recht_bitfield->heeftRecht('31') == false) {
                        echo '<a href="" id="dashboard3" onclick="return false"><img src="images/inactiefcharts.png" height="60" width="60"/><div id="dashboard3txt">Statistieken</div></a>';
                    } else {
                        echo '<a href="index.php?page=statistieken" id="dashboard3"><img src="images/charts.png" height="60" width="60"/><div id="dashboard3txt">Statistieken</div></a>';
                    }
                    ?>

                </div>
                <div id="dashboard2">

                    <?php
                    if ($recht_bitfield->heeftRecht('32') == false) {
                        echo '<a href="" id="dashboard2" onclick="return false"><img src="images/inactiefsearch.png"><div id="dashboard2txt">Zoeken</div></a>';
                    } else {
                        echo '<a href="index.php?page=zoeken" id="dashboard2"><img src="images/search.png" height="60" width="60"/><div id="dashboard2txt">Zoeken</div></a>';
                    }
                    ?>

                </div>
                <div id="dashboard1">

                    <?php
                    if ($recht_bitfield->heeftRecht('33') == false) {
                        echo '<a href="" id="dashboard1" onclick="return false"><img src="images/inactiefsettings.png"><div id="dashboard1txt">Instellingen</div></a>';
                    } else {
                        echo '<a href="index.php?page=instellingen" id="dashboard1"><img src="images/settings.png"height="60" width="60"/><div id="dashboard1txt">Instellingen</div></a>';
                    }
                    ?>

                </div>
                <br/>
                <br/>
            </div>
        </div>
    </div>        
</div>
